from openpyxl import load_workbook

class Tools():
    def __init__(self,path,sheetname):
        self.path=load_workbook(path)
        self.sheetname=self.path[sheetname]

    def getdata(self):
        datalist=[]
        for line in  self.sheetname:
            list=[]
            list.append(line[0].value)
            list.append(line[1].value)
            datalist.append(list)
        datalist.pop(0)
        return datalist


if __name__ == '__main__':
    path=r"C:\Users\HP\Desktop\table.xlsx"
    sheetname='Sheet1'
    dy=Tools(path,sheetname)
    print(dy.getdata())